
class Point {
  public int x;
  public int y;
  public Point origine;

  public Point(int a, int b){
    x = a;
    y = b;
    origine = null;
    }

  public Point(Point autre){
    x = autre.getx();
    y = autre.gety();
    }

  public int getx() {
    return x;
    }
    
  public int gety() {
    return y;
    }
    
  public void setx(int l) {
    x = l;
    }
    
  public void sety(int l) {
    y = l;
    }
  
  public void init (int xi,int yi) {
    x = xi;
    y = yi;
    }
        
  public void xtrans(int d){
    x = x + d;
    }

  public void ytrans(int d){
    y = y + d;
    }
    
  public Point milieu (Point p){
    Point m = new Point();
    m.init((x + p.x)/2, (y + p.y)/2);
    return m;
    }
  }


class PointCol extends Point {
  private int col;

  public  PointCol (int xi,int yi, int ci) {
	x = xi;
	y = yi;
	col = ci;
	}

  public void changer(int val){
    this.col = val;
    }
  
  public void init (int xi,int yi) {
    this.x = xi;
    this.y = yi;
    this.col = 84;
    }

  public int type () {
    return 2;
    } 
  
  }

class Geo {
  public void main ( int args ) {
    Point p = new Point();
    Point p1 = new Point();
    PointCol pc = new PointCol();
    int l;
    p.init(5,4);
    p1.init(6,2);
    pc.init(6,1);
    Point m ;
    m = p.milieu(p1);
    Point m1 ;
    m1 = p.milieu(pc);
    Point m2 ;
    m2 = pc.milieu(p);
    Point m3 ;
    m3 = pc.milieu(pc);
    l = p.type();
    p = pc;
    l = p.type();
  }
}
